package com.design.designmode.create.builder;

import java.util.ArrayList;
import java.util.List;

/**
 * @author hxl
 * @since 2023-04-15
 */
public class Product {
    List<String> parts = new ArrayList<String>();

    public void add(String part) {
        parts.add(part);
    }

    public void show() {
        System.out.print("产品的组成：");
        for (String s : parts)
            System.out.print(s + " ");

        System.out.print("\n");
    }

}
